package cn.bdqn.demo.async;

import cn.bdqn.demo.seckill.SecKillService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AsyncService {
    @Resource
    SecKillService secKillService;

    @Async
    public void mock(String productId, Integer userId,boolean locked) {
        secKillService.secKill(productId, userId, locked);
    }
}
